package org.shoukaiseki.supersaiyan.db.inittable.generator;


import org.shoukaiseki.inittable.domain.TableColumnInfo;
import org.shoukaiseki.inittable.service.ITableBuildInfoService;
import org.shoukaiseki.kakaroto.annotation.TableBuild;

import java.util.List;

import static org.shoukaiseki.inittable.utils.SksColumnCamelCaseCommon.*;
import static org.shoukaiseki.inittable.utils.TableColumnInfoBuilder.column;
import static org.shoukaiseki.inittable.utils.TableInfoUtils.tableColumns;


/**
 * OK
 * org.shoukaiseki.supersaiyan.db.inittable.generator.GenTableColumnInitTableInfo
 * <br>
 *
 * @author shoukaiseki blog http://www.shoukaiseki.top/<br> E-mail jiang28555@Gmail.com<br>
 * @date 2022-10-10 19:37:46<br>
 */
@TableBuild(name = "gen_table_column", comment = "代码生成业务表字段",version = 1)
public class GenTableColumnInitTableInfo implements ITableBuildInfoService {


    @Override
    public List<TableColumnInfo> tableColumnInfoList(){
        List<TableColumnInfo> table = tableColumns(
                uniqueId("column_id","编号"),
                relationshipId("table_id","归属表编号"),
                column("	column_name    varchar(200)                 null comment '列名称',"),
                column("	column_comment varchar(500)                 null comment '列描述',"),
                column("	column_type    varchar(100)                 null comment '列类型',"),
                column("	java_type      varchar(500)                 null comment 'JAVA类型',"),
                column("	java_field     varchar(200)                 null comment 'JAVA字段名',"),
                column("	is_pk          char                         null comment '是否主键（1是）',"),
                column("	is_increment   char                         null comment '是否自增（1是）',"),
                column("	is_required    char                         null comment '是否必填（1是）',"),
                column("	is_insert      char                         null comment '是否为插入字段（1是）',"),
                column("	is_edit        char                         null comment '是否编辑字段（1是）',"),
                column("	is_list        char                         null comment '是否列表字段（1是）',"),
                column("	is_query       char                         null comment '是否查询字段（1是）',"),
                column("	query_type     varchar(200)    default 'EQ' null comment '查询方式',")
                        .description("（等于、不等于、大于、小于、范围）"),
                column("	html_type      varchar(200)                 null comment '显示类型',")
                        .description("（文本框、文本域、下拉框、复选框、单选框、日期控件）"),
                column("	dict_type      varchar(200)    default ''   null comment '字典类型',"),

                column("	sks_query_html_type     varchar(200)    default '' null comment 'SKS查询控件类型',")
                        .description(""),
                column("	sks_list_html_type     varchar(200)    default '' null comment 'SKS列表控件类型',")
                        .description(""),
                column("	sks_form_html_type     varchar(200)    default '' null comment 'SKS对话框控件类型',")
                        .description(""),
                column("	sks_form_rule_type     varchar(200)    default '' null comment 'SKS对话框规则类型',")
                        .description(""),
                sort(),
                createUserId(),
                createTime(),
                updateUserId(),
                updateTime(),

                null
        );

        return table;
    }

}
